<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--深度克隆 克隆-->
    <style>
        .left,
        .right {
            width: 300px;
            height: 120px;
        }

        .left div,
        .right div {
            width: 100px;
            height: 90px;
            padding: 5px;
            margin: 5px;
            float: left;
            border: 1px solid #ccc;
            background: #bbffaa;
        }
    </style>
</head>
</head>
<body>
<h2>通过clone克隆元素</h2>
<div class="left">
    <div class="aaron1">点击,clone浅拷贝</div>
    <div class="aaron2">点击,clone深拷贝,可以继续触发创建</div>
</div>
<script src="../js/jquery-3.1.0.js"></script>
<script type="text/javascript">
    //只克隆节点
    //不克隆事件
    $(".aaron1").on("click",function () {
        $(".left").append($(this).clone().css("color","red"));//链式 表示
    })
    //克隆节点
    //克隆事件
    $(".aaron2").on("click",function () {
        $(".left").append($(this).clone(true).css("color","blue"));//深度克隆
    })
</script>


</body>
</html>